#!/bin/sh
if [ ! -d ./dist/macapp.app ]; then
  echo "macapp.app not exit!"
  exit 1
fi

echo "delete old dmg if exists"
rm -f ./dist/macapp.dmg

echo "begin making dmg"
appdmg ./Installer/package.json ./dist/macapp.dmg
echo "end making dmg"
cp -f ./dist/macapp.dmg ~/Desktop/
